class Solution:
	# @param n, an integer
	# @return an integer
	def hammingWeight(self, n):
		ones = 0
		for x in xrange(32):
			if n & 1 == 1:
				ones += 1
			n = n >> 1
		return ones

if __name__ == '__main__':
	so = Solution()
	print so.hammingWeight(3)